import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

import layout from '@/views/Layout'
import login from '@/views/Login'
import company from '@/views/Company'
import find from '@/views/Find'
import mine from '@/views/Mine'
import question from '@/views/Question'

const routes = [
    { path: "/", redirect: "/question" },
    {
        name: 'login',
        path: '/login',
        component: login
    },
    {
        name: 'layout',
        path: '/layout',
        component: layout,
        children: [
            { name: 'company', path: '/company', component: company },
            { name: 'find', path: '/find', component: find },
            { name: 'mine', path: '/mine', component: mine },
            { name: 'question', path: '/question', component: question }
        ]
    },
]

const router = new VueRouter({
    routes
})

export default router